Automated code generation for discontinuous Galerkin methods
نویسندگان
چکیده
A compiler approach for generating low-level computer code from high-level input for discontinuous Galerkin finite element forms is presented. The input language mirrors conventional mathematical notation, and the compiler generates efficient code in a standard programming language. This facilitates the rapid generation of efficient code for general equations in varying spatial dimensions. Key concepts underlying the compiler approach and the automated generation of computer code are elaborated. The approach is demonstrated for a range of common problems, including the Poisson, biharmonic, advection–diffusion and Stokes equations. 1. Introduction. Discontinuous Galerkin methods in space have emerged as a generalisation of finite element methods for solving a range of partial differential equations. While historically used for first-order hyperbolic equations, discontinuous Galerkin methods are now applied to a range of hyperbolic, parabolic and elliptic problems. In addition to the usual integration over cell volumes that characterises the conventional finite element method, discontinuous Galerkin methods also involve the integration of flux terms over interior facets. Discontinuous Galerkin methods exist in many variants, and are generally distinguished by the form of the flux on facets. A sample of fluxes for elliptic problems can be found in [4]. We present here a compiler approach for generating computer code for discontin-uous Galerkin forms. From a high-level input language which resembles conventional mathematical notation, low-level computer code is generated automatically. The generated code is called by an assembler to construct global sparse tensors, commonly known as the 'stiffness matrix' and the 'load vector'. The compiler approach affords a number of interesting possibilities. It permits the rapid prototyping and testing of new methods, as well as providing scope for producing optimised code. The latter can be achieved through the compiler by precomputing various terms which are traditionally evaluated at run time, and by deploying procedures for analysing the structure of forms which facilitates various a priori optimisations which may not be tractable when developing computer code in a conventional fashion. In addition, the representations of element tensors (element stiffness matrices) for a given variational form are not limited to the usual quadrature-loop approach. For many forms, computation-ally more efficient representations can be employed. In essence, the form compiler approach allows a high level of generality, while competing in terms of performance with specialised, dedicated code, as will be elaborated in this work. The use of a form compiler is particularly attractive for mixed problems, where one may wish to work …
منابع مشابه
Efficient Matrix-free Implementation of Discontinuous Galerkin Methods for Compressible Flow Problems
We discuss the matrix-free implementation of Discontinuous Galerkin methods for compressible flow problems, i.e. the compressible Navier-Stokes equations. For the spatial discretization the CDG2 method and for temporal discretization an explicit Runge-Kutta method is used. For the presented matrix-free approach we discuss asynchronous communication, shared memory parallelization, and automated ...
متن کاملSpECTRE: A Task-based Discontinuous Galerkin Code for Relativistic Astrophysics
We introduce a new relativistic astrophysics code, SpECTRE, that combines a discontinuous Galerkin method with a task-based parallelism model. SpECTRE’s goal is to achieve more accurate solutions for challenging relativistic astrophysics problems such as core-collapse supernovae and binary neutron star mergers. The robustness of the discontinuous Galerkin method allows for the use of high-resol...
متن کاملModeling the motion of pyrolysis gas through charring ablating material using Discontinuous Galerkin finite elements
A series of efforts were made to solve a simple ablation problem with gas motion through the porous media employing finite element based Galerkin and Discontinuous Galerkin methods. First, one-dimensional solutions of Euler and magneto-hydrodynamics (MHD) equations are presented for comparison with analytical results, to validate the code. The spurious oscillations of standard Galerkin approach...
متن کاملParallelization of an Object-Oriented Unstructured Aeroacoustics Solver
A computational aeroacoustics code based on the discontinuous Galerkin method is ported to several parallel platforms using MPI. The discontinuous Galerkin method is a compact high-order method that retains its accuracy and robustness on non-smooth unstructured meshes. In its semi-discrete form, the discontinuous Galerkin method can be combined with explicit time marching methods making it well...
متن کاملAdaptive Unstructured Spacetime Meshing for Four-dimensional Spacetime Discontinuous Galerkin Finite Element Methods
We describe the spacetime discontinuous Galerkin method, a new type of finite-element method which promises dramatic improvement in solution speed for hyperbolic problems. These methods require the generation of spacetime meshes that satisfy a special causality constraint. This work focuses on the extension of the existing 2d×time spacetime meshing algorithm known as TentPitcher to 3d×time prob...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- SIAM J. Scientific Computing
دوره 31 شماره
صفحات -
تاریخ انتشار 2008